BSDCan2011 - Final (with audio).5

BSDCan 2011
The Technical BSD Conference

Speakers
Ivan Voras
Schedule
Day Talks - 1 - 2011-05-13
Room Tutorial
Start time 11:30
Duration 01:00
Info
ID 234
Event type Lecture
Track System Administration
Language used for presentation English

BSDLua

Evolution of Unix scripting

BSDLUA is an experimental effort to integrate Lua as a scripting language in a modern Unix environment, by providing native Lua-C bindings for a subset of libc, as well as maintaining the ability to invoke and interface with system utilities. By doing this, Lua can be used both for simple shell scripting tasks and for writing more complex system utilities.

The issue of scriptability of Unix system seems like a topic resolved a long time ago with shell scripts – they are reasonably powerful and can be very tightly integrated with system utilities. However, though it is an old truism that the quality of the program depends mostly on the programmer and not on his tools, newer and better tools can significantly increase productivity and ease maintenance. Lua has many advantages over traditional shell scripts: a cleaner syntax with powerful language features (lexical scoping, OOP, closures), exceptional suitability for interaction with C libraries, a garbage collector and a modular approach which makes writing long programs much cleaner then in shell code. In addition to that, the Lua interpreter is very small, easily embeddable in widely different environments and BSD licensed.